package uk.ac.glasgow.electionsystem.users;

import uk.ac.glasgow.electionsystem.interfaces.Candidate;

public class CandidateImpl extends Voter implements Candidate{
	
	
	//votes have got
	private int mVotes;

	public CandidateImpl(String surname, String forename, String GUID,
			String password) {
		super(surname, forename, GUID, password);
		super.setRole(CANDIDATE);
		mVotes = 0;
	}

	/**
	 * invoked if the user has been voted by others
	 */
	public void beVotedByOthers(){
		mVotes++;
	}

	public void decrementVotes(){
		mVotes--;
	}

	/**
	 * get the votes the people got
	 * @return int - number of votes
	 */
	public int getVotes(){
		return mVotes;
	}

	@Override
	public String getGUID() {
		return getUserGUID();
	}

	@Override
	public String getCandidateSurname() {
		return getSurname();
	}

	@Override
	public String getCandidateForename() {
		return getForename();
	
	}
}
